﻿//
// Created by francklinson on 2021/3/16.
//
// Chapter 7 Homework 1
#include <iostream>

using namespace std;

double average(double a, double b);

int main()
{
    double a, b;
    cout << "Enter 2 numbers:" << endl;
    while (cin >> a >> b and a != 0 and b != 0)
    {
        cout << average(a, b) << endl;
        cout << "Enter 2 numbers:" << endl;
    }
    return 0;
}

double average(double a, double b)
{
    return 2.0 * a * b / (a + b);
}
